home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / include / user / RCS / status.h,v < prev    next >
Encoding:
Text File  |  1992-07-17  |  11.3 KB  |  338 lines

  1. head     1.5;
  2. branch   ;
  3. access   ;
  4. symbols  srv030:1.5 srv027:1.5 srv026:1.5 srv024:1.5 srv021:1.5 srv019:1.5 srv018:1.5 srv016:1.5 srv014:1.5 srv010:1.5 srv008:1.5 srv007:1.5 srv006:1.5 srv005:1.5 srv004:1.5 srv003:1.5 srv002:1.5 srv001:1.5;
  5. locks    ; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.5
  10. date     91.11.11.23.10.56;  author kupfer;  state Exp;
  11. branches ;
  12. next     1.4;
  13.  
  14. 1.4
  15. date     91.10.04.11.53.56;  author kupfer;  state Exp;
  16. branches ;
  17. next     1.3;
  18.  
  19. 1.3
  20. date     91.09.26.12.25.42;  author kupfer;  state Exp;
  21. branches ;
  22. next     1.2;
  23.  
  24. 1.2
  25. date     91.09.01.21.14.18;  author kupfer;  state Exp;
  26. branches ;
  27. next     1.1;
  28.  
  29. 1.1
  30. date     91.08.05.22.47.01;  author kupfer;  state Exp;
  31. branches ;
  32. next     ;
  33.  
  34.  
  35. desc
  36. @Sprite status codes.
  37. @
  38.  
  39.  
  40. 1.5
  41. log
  42. @Add NET_PACKET_TOO_BIG and MACH_VERS_MISMATCH.
  43. @
  44. text
  45. @/*
  46.  * status.h --
  47.  *
  48.  *     Define the statuses that are returned from modules.
  49.  *
  50.  *    The fields of a status value are defined in the following way:
  51.  *
  52.  *    MSB                  LSB
  53.  *    +--------+----------+----------+
  54.  *    |Pub/Priv| Module # | Message #|
  55.  *    +--------+----------+----------+
  56.  *      1 bit    15 bits     16 bits
  57.  *
  58.  *    The Pub/Priv bit if 0 is used to specify that the status is
  59.  *        public and can be used by other modules.
  60.  *    The Pub/Priv bit if 1 is used to specify that the status is
  61.  *        private and can not be used by other modules.
  62.  *    The module and message numbers are used to index the message array.
  63.  *
  64.  * Copyright 1986, 1988 Regents of the University of California
  65.  * Permission to use, copy, modify, and distribute this
  66.  * software and its documentation for any purpose and without
  67.  * fee is hereby granted, provided that the above copyright
  68.  * notice appear in all copies.  The University of California
  69.  * makes no representations about the suitability of this
  70.  * software for any purpose.  It is provided "as is" without
  71.  * express or implied warranty.
  72.  *
  73.  * $Header: /r3/kupfer/spriteserver/include/user/RCS/status.h,v 1.4 91/10/04 11:53:56 kupfer Exp Locker: kupfer $ SPRITE (Berkeley)
  74.  */
  75.  
  76. #ifndef _STATUS
  77. #define _STATUS
  78.  
  79. #ifndef _ASM
  80.  
  81. #ifndef _SPRITE
  82. #include <sprite.h>
  83. #endif
  84.  
  85. extern char *Stat_GetMsg _ARGS_((ReturnStatus status));
  86. extern char *Stat_GetPrivateMsg();
  87. extern void Stat_PrintMsg _ARGS_((ReturnStatus status, char *string));
  88.  
  89. /*
  90.  * STAT_IS_PRIVATE is TRUE if the status value is private and
  91.  *     is FALSE if the status is public.
  92.  */
  93.  
  94. #define STAT_IS_PRIVATE(status)    ((status) & 0x80000000)
  95. #define STAT_MODULE(status)    (((status)& 0x7fffffff) >> 16)
  96. #define STAT_MSGNUM(status)    ((status) & 0x0000FFFF)
  97.  
  98. /*
  99.  * stat_LastError contains the result of the last failed system call (some
  100.  * library functions may also alter its value).
  101.  */
  102. extern ReturnStatus    stat_LastError;
  103. extern void           Stat_SetErrorHandler();
  104. extern void           Stat_SetErrorData();
  105. extern void        Stat_GetErrorHandler();
  106. extern ReturnStatus    Stat_Error();
  107.  
  108. /*
  109.  * The procedures below are used to map between Sprite and UNIX
  110.  * error numbers, for the interim period before Sprite converts
  111.  * over to using UNIX error numbers.
  112.  */
  113.  
  114. extern int        Compat_MapCode _ARGS_((ReturnStatus status));
  115. extern ReturnStatus    Compat_MapToSprite _ARGS_((int unixErrno));
  116.  
  117. #endif /* _ASM */
  118.  
  119. /*---------------------------------------------*/
  120.  
  121. /*    gen.stat    */
  122. #define GEN_SUCCESS                            0x00000000
  123. #define GEN_FAILURE                            0x00000001
  124. #define GEN_ABORTED_BY_SIGNAL                  0x00000002
  125. #define GEN_NO_PERMISSION                      0x00000003
  126. #define GEN_NOT_IMPLEMENTED                    0x00000004
  127. #define GEN_INVALID_ARG                        0x00000005
  128. #define GEN_TIMEOUT                            0x00000006
  129. #define GEN_EPERM                            0x00000007
  130. #define GEN_ENOENT                            0x00000008
  131. #define GEN_EINTR                            0x00000009
  132. #define GEN_E2BIG                            0x0000000a
  133. #define GEN_EAGAIN                            0x0000000b
  134. #define GEN_EACCES                            0x0000000c
  135. #define GEN_EFAULT                            0x0000000d
  136. #define GEN_EEXIST                            0x0000000e
  137. #define GEN_EINVAL                            0x0000000f
  138. #define GEN_EFBIG                            0x00000010
  139. #define GEN_ENOSPC                            0x00000011
  140. #define GEN_ERANGE                            0x00000012
  141. #define GEN_EIDRM                            0x00000013
  142.  
  143. /*    proc.stat    */
  144. #define PROC_BAD_FILE_NAME                      0x00010000
  145. #define PROC_BAD_AOUT_FORMAT                    0x00010001
  146. #define PROC_NO_SEGMENTS                        0x00010002
  147. #define PROC_CHILD_PROC                         0x00010003
  148. #define PROC_NO_EXITS                           0x00010004
  149. #define PROC_INVALID_PID                        0x00010005
  150. #define PROC_UID_MISMATCH                       0x00010006
  151. #define PROC_NO_CHILDREN                        0x00010007
  152. #define PROC_INVALID_FAMILY_ID                  0x00010008
  153. #define PROC_NOT_SET_ENVIRON_VAR                0x00010009
  154. #define PROC_BAD_ENVIRON_STRING                 0x0001000a
  155. #define PROC_ENVIRON_FULL                       0x0001000b
  156. #define PROC_INVALID_NODE_ID                    0x0001000c
  157. #define PROC_MIGRATION_REFUSED                  0x0001000d
  158. #define PROC_INVALID_STRING                     0x0001000e
  159. #define PROC_NO_STACKS                          0x0001000f
  160. #define PROC_NO_PEER                            0x00010010
  161.  
  162. /*    sys.stat    */
  163. #define SYS_ARG_NOACCESS                       0x00020000
  164. #define SYS_INVALID_ARG                        0x00020001
  165. #define SYS_INVALID_SYSTEM_CALL                0x00020002
  166.  
  167. /*    rpc.stat    */
  168. #define RPC_INVALID_ARG                        0x00030000
  169. #define RPC_NO_CHANNELS                        0x00030001
  170. #define RPC_TIMEOUT                            0x00030002
  171. #define RPC_TOO_MANY_ACKS                      0x00030003
  172. #define RPC_INTERNAL_ERROR                     0x00030004
  173. #define RPC_INVALID_RPC                        0x00030005
  174. #define RPC_NULL_ERROR                         0x00030006
  175. #define RPC_PARAMS_TOOBIG                      0x00030007
  176. #define RPC_DATA_TOOBIG                        0x00030008
  177. #define RPC_NO_REPLY                           0x00030009
  178. #define RPC_SERVICE_DISABLED                   0x0003000a
  179. #define    RPC_NACK_ERROR                0x0003000b
  180. #define    RPC_FS_NO_PREFIX            0x0003000c
  181.  
  182. /*    fs.stat    */
  183. #define FS_NO_ACCESS                          0x00040000
  184. #define FS_INVALID_ARG                        0x00040001
  185. #define FS_REMOTE_OP_INVALID                  0x00040002
  186. #define FS_LOCAL_OP_INVALID                   0x00040003
  187. #define FS_DEVICE_OP_INVALID                  0x00040004
  188. #define FS_NEW_ID_TOO_BIG                     0x00040005
  189. #define FS_MASTER_CLOSED                      0x00040006
  190. #define FS_BROKEN_PIPE                        0x00040007
  191. #define FS_NO_DISK_SPACE                      0x00040008
  192. #define FS_LOOKUP_REDIRECT                    0x00040009
  193. #define FS_NO_HANDLE                          0x0004000a
  194. #define FS_NEW_PREFIX                         0x0004000b
  195. #define FS_FILE_NOT_FOUND                     0x0004000c
  196. #define FS_WOULD_BLOCK                        0x0004000d
  197. #define FS_BUFFER_TOO_BIG                     0x0004000e
  198. #define FS_IS_DIRECTORY                       0x0004000f
  199. #define FS_NOT_DIRECTORY                      0x00040010
  200. #define FS_NOT_OWNER                          0x00040011
  201. #define FS_STALE_HANDLE                       0x00040012
  202. #define FS_FILE_EXISTS                        0x00040013
  203. #define FS_DIR_NOT_EMPTY                      0x00040014
  204. #define FS_NAME_LOOP                          0x00040015
  205. #define FS_CROSS_DOMAIN_OPERATION             0x00040016
  206. #define FS_TIMEOUT                            0x00040017
  207. #define FS_NO_SHARED_LOCK                     0x00040018
  208. #define FS_NO_EXCLUSIVE_LOCK                  0x00040019
  209. #define FS_WRONG_TYPE                         0x0004001a
  210. #define FS_FILE_REMOVED                       0x0004001b
  211. #define FS_FILE_BUSY                          0x0004001c
  212. #define FS_BAD_SEEK                           0x0004001d
  213. #define FS_DOMAIN_UNAVAILABLE                 0x0004001e
  214. #define FS_VERSION_MISMATCH                   0x0004001f
  215. #define FS_NOT_CACHEABLE                      0x00040020
  216.  
  217. /*    vm.stat    */
  218. #define VM_WRONG_SEG_TYPE                     0x00050000
  219. #define VM_SEG_TOO_LARGE                      0x00050001
  220. #define VM_SHORT_READ                         0x00050002
  221. #define VM_SHORT_WRITE                        0x00050003
  222. #define VM_SWAP_ERROR                         0x00050004
  223. #define VM_NO_SEGMENTS                        0x00050005
  224. #define VM_SEG_NOT_FOUND            0x00050006
  225. #define VM_SEGMENT_DESTROYED            0x00050007
  226. #define VM_CORRUPTED                0x00050008
  227.  
  228. /*    sig.stat    */
  229. #define SIG_INVALID_SIGNAL                     0x00060000
  230. #define SIG_INVALID_ACTION                     0x00060001
  231.  
  232. /*    dev.stat    */
  233. #define DEV_DMA_FAULT                          0x00070000
  234. #define DEV_INVALID_UNIT                       0x00070001
  235. #define DEV_TIMEOUT                            0x00070002
  236. #define DEV_OFFLINE                            0x00070003
  237. #define DEV_HANDSHAKE_ERROR                    0x00070004
  238. #define DEV_RETRY_ERROR                        0x00070005
  239. #define DEV_NO_DEVICE                          0x00070006
  240. #define DEV_INVALID_ARG                        0x00070007
  241. #define DEV_HARD_ERROR                         0x00070008
  242. #define DEV_END_OF_TAPE                        0x00070009
  243. #define DEV_NO_MEDIA                           0x0007000a
  244. #define DEV_EARLY_CMD_COMPLETION               0x0007000b
  245. #define DEV_NO_SENSE                           0x0007000c
  246. #define DEV_BLANK_CHECK                        0x0007000d
  247. #define DEV_BUSY                0x0007000e
  248. #define DEV_RESET                0x0007000f
  249.  
  250. /*    net.stat    */
  251. #define NET_UNREACHABLE_NET                    0x00080000
  252. #define NET_UNREACHABLE_HOST                   0x00080001
  253. #define NET_CONNECT_REFUSED                    0x00080002
  254. #define NET_CONNECTION_RESET                   0x00080003
  255. #define NET_NO_CONNECTS                        0x00080004
  256. #define NET_ALREADY_CONNECTED                  0x00080005
  257. #define NET_NOT_CONNECTED                      0x00080006
  258. #define NET_ADDRESS_IN_USE                     0x00080007
  259. #define NET_ADDRESS_NOT_AVAIL                  0x00080008
  260. #define NET_BAD_PROTOCOL                       0x00080009
  261. #define NET_BAD_OPERATION                      0x0008000a
  262. #define NET_BAD_OPTION                         0x0008000b
  263. #define NET_PACKET_TOO_BIG            0x0008000c
  264.  
  265. /*     mach.stat     */
  266. #define MACH_OTHER_ERROR                        0x00090000
  267. #define MACH_RESOURCE_SHORTAGE            0x00090001
  268. #define MACH_VM_ERROR                0x00090002
  269. #define MACH_NOT_IN_SET                0x00090003
  270. #define MACH_NAME_EXISTS            0x00090004
  271. #define MACH_INVALID_NAME            0x00090005
  272. #define MACH_DEAD_TASK                0x00090006
  273. #define MACH_INVALID_RIGHT            0x00090007
  274. #define MACH_UREFS_OVERFLOW            0x00090008
  275. #define MACH_IPC_ERROR                0x00090009
  276. #define MACH_RIGHT_EXISTS            0x0009000a
  277. #define MACH_RCV_ERROR                0x0009000b
  278. #define MACH_SEND_ERROR                0x0009000c
  279. #define MACH_MIG_ERROR                0x0009000d
  280. #define MACH_VERS_MISMATCH            0x0009000e
  281.  
  282.  
  283. /*---------------------------------------------*/
  284.  
  285. #endif /* _STATUS */
  286. @
  287.  
  288.  
  289. 1.4
  290. log
  291. @Add VM_CORRUPTED.
  292. @
  293. text
  294. @d29 1
  295. a29 1
  296.  * $Header: /r3/kupfer/spriteserver/include/user/RCS/status.h,v 1.3 91/09/26 12:25:42 kupfer Exp Locker: kupfer $ SPRITE (Berkeley)
  297. d219 1
  298. d236 1
  299. @
  300.  
  301.  
  302. 1.3
  303. log
  304. @Add new status codes for dealing with Mach error returns.
  305. @
  306. text
  307. @d29 1
  308. a29 1
  309.  * $Header: /r3/kupfer/spriteserver/include/user/RCS/status.h,v 1.2 91/09/01 21:14:18 kupfer Exp Locker: kupfer $ SPRITE (Berkeley)
  310. d182 1
  311. @
  312.  
  313.  
  314. 1.2
  315. log
  316. @Add VM_SEG_NOT_FOUND.
  317. @
  318. text
  319. @d29 1
  320. a29 1
  321.  * $Header: /user6/kupfer/spriteserver/include/RCS/status.h,v 1.1 91/08/05 22:47:01 kupfer Exp Locker: kupfer $ SPRITE (Berkeley)
  322. d72 1
  323. d181 1
  324. d218 16
  325. @
  326.  
  327.  
  328. 1.1
  329. log
  330. @Initial revision
  331. @
  332. text
  333. @d29 1
  334. a29 1
  335.  * $Header: /sprite/src/lib/include/RCS/status.h,v 1.13 91/06/07 12:44:02 jhh Exp $ SPRITE (Berkeley)
  336. d179 1
  337. @
  338.